﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using CVS.DAL;
using CVS.WebAPI.Models;

namespace CVS.WebAPI.Mappers
{
    public static class TasksMapper
    {
        public static List<TaskDto> MapTasks(List<Task> tasks)
        {
            var tasksDtos = tasks.Select(task => new TaskDto
            {
                Id = task.Id,
                Name = task.Name,
                Description = task.Description
            }).ToList();

            return tasksDtos;
        }
    }
}